home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / Moscow ML 1.31 / source code / mosml / src / compiler / Instruct.sml < prev    next >
Encoding:
Text File  |  1996-07-03  |  976 b   |  44 lines  |  [TEXT/R*ch]

  1. (* The type of the instructions of the abstract machine *)
  2.  
  3. open Config Const Prim;
  4.  
  5. datatype ZamInstruction =
  6.     Kquote of StructConstant
  7.   | Kget_global of QualifiedIdent * int
  8.   | Kset_global of QualifiedIdent * int
  9.   | Kaccess of int
  10.   | Kgrab
  11.   | Kpush
  12.   | Kpushmark
  13.   | Klet
  14.   | Kendlet of int
  15.   | Kapply
  16.   | Ktermapply
  17.   | Kcheck_signals
  18.   | Kreturn
  19.   | Kclosure of int
  20.   | Kletrec1 of int
  21.   | Kmakeblock of BlockTag * int
  22.   | Kprim of primitive
  23.   | Kpushtrap of int
  24.   | Kpoptrap
  25.   | Klabel of int
  26.   | Kbranch of int
  27.   | Kbranchif of int
  28.   | Kbranchifnot of int
  29.   | Kstrictbranchif of int
  30.   | Kstrictbranchifnot of int
  31.   | Ktest of bool_test * int
  32.   | Kbranchinterval of int * int * int * int
  33.   | Kswitch of int Array.array
  34. ;
  35.  
  36. type ZamPhrase =
  37. {
  38.   kph_funcs:   ZamInstruction list,     (* code for functions *)
  39.   kph_inits:   ZamInstruction list,     (* initialization code *)
  40.   kph_is_pure: bool                     (* pure = no side effects *)
  41. };
  42.  
  43. val Nolabel = ~1;
  44.